3.7 \(\int \frac {(a+b x) \sin (c+d x)}{x^3} \, dx\)

Optimal. Leaf size=89 \[ -\frac {1}{2} a d^2 \sin (c) \text {Ci}(d x)-\frac {1}{2} a d^2 \cos (c) \text {Si}(d x)-\frac {a \sin (c+d x)}{2 x^2}-\frac {a d \cos (c+d x)}{2 x}+b d \cos (c) \text {Ci}(d x)-b d \sin (c) \text {Si}(d x)-\frac {b \sin (c+d x)}{x} \]

[Out]

b*d*Ci(d*x)*cos(c)-1/2*a*d*cos(d*x+c)/x-1/2*a*d^2*cos(c)*Si(d*x)-1/2*a*d^2*Ci(d*x)*sin(c)-b*d*Si(d*x)*sin(c)-1
/2*a*sin(d*x+c)/x^2-b*sin(d*x+c)/x

________________________________________________________________________________________

Rubi [A]  time = 0.27, antiderivative size = 89, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 5, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {6742, 3297, 3303, 3299, 3302} \[ -\frac {1}{2} a d^2 \sin (c) \text {CosIntegral}(d x)-\frac {1}{2} a d^2 \cos (c) \text {Si}(d x)-\frac {a \sin (c+d x)}{2 x^2}-\frac {a d \cos (c+d x)}{2 x}+b d \cos (c) \text {CosIntegral}(d x)-b d \sin (c) \text {Si}(d x)-\frac {b \sin (c+d x)}{x} \]

Antiderivative was successfully verified.

[In]

Int[((a + b*x)*Sin[c + d*x])/x^3,x]

[Out]

-(a*d*Cos[c + d*x])/(2*x) + b*d*Cos[c]*CosIntegral[d*x] - (a*d^2*CosIntegral[d*x]*Sin[c])/2 - (a*Sin[c + d*x])
/(2*x^2) - (b*Sin[c + d*x])/x - (a*d^2*Cos[c]*SinIntegral[d*x])/2 - b*d*Sin[c]*SinIntegral[d*x]

Rule 3297

Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[((c + d*x)^(m + 1)*Sin[e + f*x])/(d*(
m + 1)), x] - Dist[f/(d*(m + 1)), Int[(c + d*x)^(m + 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && LtQ[
m, -1]

Rule 3299

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3302

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rule 3303

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[(c*f)/d + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[(c*f)/d + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

\begin {align*} \int \frac {(a+b x) \sin (c+d x)}{x^3} \, dx &=\int \left (\frac {a \sin (c+d x)}{x^3}+\frac {b \sin (c+d x)}{x^2}\right ) \, dx\\ &=a \int \frac {\sin (c+d x)}{x^3} \, dx+b \int \frac {\sin (c+d x)}{x^2} \, dx\\ &=-\frac {a \sin (c+d x)}{2 x^2}-\frac {b \sin (c+d x)}{x}+\frac {1}{2} (a d) \int \frac {\cos (c+d x)}{x^2} \, dx+(b d) \int \frac {\cos (c+d x)}{x} \, dx\\ &=-\frac {a d \cos (c+d x)}{2 x}-\frac {a \sin (c+d x)}{2 x^2}-\frac {b \sin (c+d x)}{x}-\frac {1}{2} \left (a d^2\right ) \int \frac {\sin (c+d x)}{x} \, dx+(b d \cos (c)) \int \frac {\cos (d x)}{x} \, dx-(b d \sin (c)) \int \frac {\sin (d x)}{x} \, dx\\ &=-\frac {a d \cos (c+d x)}{2 x}+b d \cos (c) \text {Ci}(d x)-\frac {a \sin (c+d x)}{2 x^2}-\frac {b \sin (c+d x)}{x}-b d \sin (c) \text {Si}(d x)-\frac {1}{2} \left (a d^2 \cos (c)\right ) \int \frac {\sin (d x)}{x} \, dx-\frac {1}{2} \left (a d^2 \sin (c)\right ) \int \frac {\cos (d x)}{x} \, dx\\ &=-\frac {a d \cos (c+d x)}{2 x}+b d \cos (c) \text {Ci}(d x)-\frac {1}{2} a d^2 \text {Ci}(d x) \sin (c)-\frac {a \sin (c+d x)}{2 x^2}-\frac {b \sin (c+d x)}{x}-\frac {1}{2} a d^2 \cos (c) \text {Si}(d x)-b d \sin (c) \text {Si}(d x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.27, size = 76, normalized size = 0.85 \[ -\frac {d x^2 \text {Ci}(d x) (a d \sin (c)-2 b \cos (c))+d x^2 \text {Si}(d x) (a d \cos (c)+2 b \sin (c))+a \sin (c+d x)+a d x \cos (c+d x)+2 b x \sin (c+d x)}{2 x^2} \]

Antiderivative was successfully verified.

[In]

Integrate[((a + b*x)*Sin[c + d*x])/x^3,x]

[Out]

-1/2*(a*d*x*Cos[c + d*x] + d*x^2*CosIntegral[d*x]*(-2*b*Cos[c] + a*d*Sin[c]) + a*Sin[c + d*x] + 2*b*x*Sin[c +
d*x] + d*x^2*(a*d*Cos[c] + 2*b*Sin[c])*SinIntegral[d*x])/x^2

________________________________________________________________________________________

fricas [A]  time = 0.71, size = 111, normalized size = 1.25 \[ -\frac {2 \, a d x \cos \left (d x + c\right ) + 2 \, {\left (a d^{2} x^{2} \operatorname {Si}\left (d x\right ) - b d x^{2} \operatorname {Ci}\left (d x\right ) - b d x^{2} \operatorname {Ci}\left (-d x\right )\right )} \cos \relax (c) + 2 \, {\left (2 \, b x + a\right )} \sin \left (d x + c\right ) + {\left (a d^{2} x^{2} \operatorname {Ci}\left (d x\right ) + a d^{2} x^{2} \operatorname {Ci}\left (-d x\right ) + 4 \, b d x^{2} \operatorname {Si}\left (d x\right )\right )} \sin \relax (c)}{4 \, x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)*sin(d*x+c)/x^3,x, algorithm="fricas")

[Out]

-1/4*(2*a*d*x*cos(d*x + c) + 2*(a*d^2*x^2*sin_integral(d*x) - b*d*x^2*cos_integral(d*x) - b*d*x^2*cos_integral
(-d*x))*cos(c) + 2*(2*b*x + a)*sin(d*x + c) + (a*d^2*x^2*cos_integral(d*x) + a*d^2*x^2*cos_integral(-d*x) + 4*
b*d*x^2*sin_integral(d*x))*sin(c))/x^2

________________________________________________________________________________________

giac [C]  time = 0.54, size = 796, normalized size = 8.94 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)*sin(d*x+c)/x^3,x, algorithm="giac")

[Out]

1/4*(a*d^2*x^2*imag_part(cos_integral(d*x))*tan(1/2*d*x)^2*tan(1/2*c)^2 - a*d^2*x^2*imag_part(cos_integral(-d*
x))*tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*a*d^2*x^2*sin_integral(d*x)*tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*a*d^2*x^2*real
_part(cos_integral(d*x))*tan(1/2*d*x)^2*tan(1/2*c) - 2*a*d^2*x^2*real_part(cos_integral(-d*x))*tan(1/2*d*x)^2*
tan(1/2*c) - 2*b*d*x^2*real_part(cos_integral(d*x))*tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*b*d*x^2*real_part(cos_inte
gral(-d*x))*tan(1/2*d*x)^2*tan(1/2*c)^2 - a*d^2*x^2*imag_part(cos_integral(d*x))*tan(1/2*d*x)^2 + a*d^2*x^2*im
ag_part(cos_integral(-d*x))*tan(1/2*d*x)^2 - 2*a*d^2*x^2*sin_integral(d*x)*tan(1/2*d*x)^2 - 4*b*d*x^2*imag_par
t(cos_integral(d*x))*tan(1/2*d*x)^2*tan(1/2*c) + 4*b*d*x^2*imag_part(cos_integral(-d*x))*tan(1/2*d*x)^2*tan(1/
2*c) - 8*b*d*x^2*sin_integral(d*x)*tan(1/2*d*x)^2*tan(1/2*c) + a*d^2*x^2*imag_part(cos_integral(d*x))*tan(1/2*
c)^2 - a*d^2*x^2*imag_part(cos_integral(-d*x))*tan(1/2*c)^2 + 2*a*d^2*x^2*sin_integral(d*x)*tan(1/2*c)^2 + 2*b
*d*x^2*real_part(cos_integral(d*x))*tan(1/2*d*x)^2 + 2*b*d*x^2*real_part(cos_integral(-d*x))*tan(1/2*d*x)^2 -
2*a*d^2*x^2*real_part(cos_integral(d*x))*tan(1/2*c) - 2*a*d^2*x^2*real_part(cos_integral(-d*x))*tan(1/2*c) - 2
*b*d*x^2*real_part(cos_integral(d*x))*tan(1/2*c)^2 - 2*b*d*x^2*real_part(cos_integral(-d*x))*tan(1/2*c)^2 - 2*
a*d*x*tan(1/2*d*x)^2*tan(1/2*c)^2 - a*d^2*x^2*imag_part(cos_integral(d*x)) + a*d^2*x^2*imag_part(cos_integral(
-d*x)) - 2*a*d^2*x^2*sin_integral(d*x) - 4*b*d*x^2*imag_part(cos_integral(d*x))*tan(1/2*c) + 4*b*d*x^2*imag_pa
rt(cos_integral(-d*x))*tan(1/2*c) - 8*b*d*x^2*sin_integral(d*x)*tan(1/2*c) + 2*b*d*x^2*real_part(cos_integral(
d*x)) + 2*b*d*x^2*real_part(cos_integral(-d*x)) + 2*a*d*x*tan(1/2*d*x)^2 + 8*a*d*x*tan(1/2*d*x)*tan(1/2*c) + 8
*b*x*tan(1/2*d*x)^2*tan(1/2*c) + 2*a*d*x*tan(1/2*c)^2 + 8*b*x*tan(1/2*d*x)*tan(1/2*c)^2 + 4*a*tan(1/2*d*x)^2*t
an(1/2*c) + 4*a*tan(1/2*d*x)*tan(1/2*c)^2 - 2*a*d*x - 8*b*x*tan(1/2*d*x) - 8*b*x*tan(1/2*c) - 4*a*tan(1/2*d*x)
 - 4*a*tan(1/2*c))/(x^2*tan(1/2*d*x)^2*tan(1/2*c)^2 + x^2*tan(1/2*d*x)^2 + x^2*tan(1/2*c)^2 + x^2)

________________________________________________________________________________________

maple [A]  time = 0.04, size = 88, normalized size = 0.99 \[ d^{2} \left (\frac {b \left (-\frac {\sin \left (d x +c \right )}{x d}-\Si \left (d x \right ) \sin \relax (c )+\Ci \left (d x \right ) \cos \relax (c )\right )}{d}+a \left (-\frac {\sin \left (d x +c \right )}{2 x^{2} d^{2}}-\frac {\cos \left (d x +c \right )}{2 x d}-\frac {\Si \left (d x \right ) \cos \relax (c )}{2}-\frac {\Ci \left (d x \right ) \sin \relax (c )}{2}\right )\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x+a)*sin(d*x+c)/x^3,x)

[Out]

d^2*(b/d*(-sin(d*x+c)/x/d-Si(d*x)*sin(c)+Ci(d*x)*cos(c))+a*(-1/2*sin(d*x+c)/x^2/d^2-1/2*cos(d*x+c)/x/d-1/2*Si(
d*x)*cos(c)-1/2*Ci(d*x)*sin(c)))

________________________________________________________________________________________

maxima [C]  time = 1.60, size = 111, normalized size = 1.25 \[ -\frac {{\left ({\left (a {\left (-i \, \Gamma \left (-2, i \, d x\right ) + i \, \Gamma \left (-2, -i \, d x\right )\right )} \cos \relax (c) - a {\left (\Gamma \left (-2, i \, d x\right ) + \Gamma \left (-2, -i \, d x\right )\right )} \sin \relax (c)\right )} d^{3} + {\left (2 \, b {\left (\Gamma \left (-2, i \, d x\right ) + \Gamma \left (-2, -i \, d x\right )\right )} \cos \relax (c) + b {\left (-2 i \, \Gamma \left (-2, i \, d x\right ) + 2 i \, \Gamma \left (-2, -i \, d x\right )\right )} \sin \relax (c)\right )} d^{2}\right )} x^{2} + 2 \, b \cos \left (d x + c\right )}{2 \, d x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)*sin(d*x+c)/x^3,x, algorithm="maxima")

[Out]

-1/2*(((a*(-I*gamma(-2, I*d*x) + I*gamma(-2, -I*d*x))*cos(c) - a*(gamma(-2, I*d*x) + gamma(-2, -I*d*x))*sin(c)
)*d^3 + (2*b*(gamma(-2, I*d*x) + gamma(-2, -I*d*x))*cos(c) + b*(-2*I*gamma(-2, I*d*x) + 2*I*gamma(-2, -I*d*x))
*sin(c))*d^2)*x^2 + 2*b*cos(d*x + c))/(d*x^2)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\sin \left (c+d\,x\right )\,\left (a+b\,x\right )}{x^3} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((sin(c + d*x)*(a + b*x))/x^3,x)

[Out]

int((sin(c + d*x)*(a + b*x))/x^3, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (a + b x\right ) \sin {\left (c + d x \right )}}{x^{3}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)*sin(d*x+c)/x**3,x)

[Out]

Integral((a + b*x)*sin(c + d*x)/x**3, x)

________________________________________________________________________________________